<?php
/**
 * Created by PhpStorm.
 * User: guokunsheng
 * Date: 2018/6/12
 * Time: 21:47
 */
namespace app\common\validate;

use think\Validate;

/**
 * 档案相关校验
 * Class Recode
 * @package app\common\validate
 */
class RecodeCat extends Validate
{
    protected $field = [
        'id' => '档案袋指定',
        'name' => '档案袋名称',
        'avatar' => '档案袋图片',
        'uid' => '用户'
    ];
    protected $rule = [
        'id' => 'require|integer',
        'name' => 'require|chsDash|max:10',
//        'avatar' => 'url',
        'uid' => 'require|integer'
    ];
    protected $scene = [
        'add'  =>  ['name'],
        'edit'  =>  ['id','name'],
        'del' => ['id','uid']
    ];

    protected $message = [

    ];
}